'use strict';

let Edit = $('[value=编辑]');//找出所有相同的节点
let Del = $('[value=删除]');

Edit.click(btnEdit);//绑定点击事件
Del.click(btnDel);

// $('[value=编辑]').click(btnEdit);

function btnAdd() {
    console.log('添加');
    location.href = './default.html';//跳转页面
}
function btnFind() {
    console.log('查找');
}
function btnEdit() {
    console.log('编辑');
    location.href='./default.html'
}
function btnDel(e) {
    console.log('删除');
    let res = confirm('你确定删除吗？');
    if (res) {
        let currentTarget = e.currentTarget;
        let tr = $(currentTarget).parent().parent();
        tr.remove();
    }

}